import Login from '../pages/Login';
import Admin from '../layout/Admin';
import UserList from '../pages/Admin/User/UserList';
import ProductList from '../pages/Admin/Proudct/ProductList';

const routes = [{
    from: '/',
    to: '/login'
  },
  {
    path: '/login',
    component: Login

  },
  {
    path: '/admin',
    component: Admin,
    children: [{
        from: "/admin/user",
        to: "/admin/user/list"
      },
      {
        from: "/admin/product",
        to: "/admin/product/list"
      },
      {
        from: "/admin",
        to: "/admin/user/list"
      },

      {
        path: '/admin/user/list',
        component: UserList

      },
      {
        path: '/admin/product/list',
        component: ProductList

      }
    ]

  }

];


export default routes;